import java.util.Scanner;

/**
 * @Author: YCKOKO
 * @Date: 2023-05-09
 * @Time:17:11
 * @Description:
 */
public class demo2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str1 = scan.nextLine();
        String str2 = scan.nextLine();

        for (int i = 0; i < str2.length(); i++) {
            String temp = String.valueOf(str2.charAt(i));
            str1 = str1.replace(temp,"");
        }
        System.out.println(str1);
    }
}
